use ATE
go
--insert into MeasType(MeasTypeID,MeasTypeName)values(21,'PointMinusOffset')


select * from MeasType


IF OBJECT_ID ( 'MeasType_Insert', 'P' ) IS NOT NULL 
    DROP PROCEDURE MeasType_Insert;
GO
CREATE PROCEDURE MeasType_Insert
    @MeasTypeID int =null, 
	@MeasTypeName nvarchar(50) =null	
AS    
    SET NOCOUNT ON;
    insert into MeasType(MeasTypeID,MeasTypeName)
	Values( @MeasTypeID,@MeasTypeName);	
GO
--
IF OBJECT_ID ( 'MeasType_select', 'P' ) IS NOT NULL 
    DROP PROCEDURE MeasType_select;
GO
CREATE PROCEDURE MeasType_select
AS    
    SET NOCOUNT ON;
    select MeasTypeID,MeasTypeName
	from MeasType;	
GO

--
IF OBJECT_ID ( 'MeasType_selectbyID', 'P' ) IS NOT NULL 
    DROP PROCEDURE MeasType_selectbyID;
GO
CREATE PROCEDURE MeasType_selectbyID
	@MeasTypeId int
AS    
    SET NOCOUNT ON;
    select MeasTypeID,MeasTypeName
	from MeasType
	where MeasTypeId=@MeasTypeId;	
GO







--
EXEC  TestItem_Insert 
	@TestItemName='RXP1Gain(1.0)',
	@StartF=1731400000.0000,
	@Max=29.2500,
	@Min=29.2500,
	@HighSpec=28.6000,
	@LowSpec=28.6000,
	@IsPass='Pass';
go